cat: default to working dir parent instead of tip
This introduces a defaultrev function that chooses
the working dir parent if a revision isn't specified,
and uses it in several places.
*** failed to import extension badext: invalid syntax (badext.py, line 1)hg help [COMMAND]show help for a command, extension, or list of commands