use '-n #' instead of '-#' for head and tail

Using 'head -1' or 'tail -1' is deprecated and not documented.
(Though it looks like it works nearly everywhere...)
remove trailing whitespace
remove trailing whitespace from vimcat as well
increase number of lines used to detect man page

I have a number of man pages starting with a PROLOG section. Detecting a
man page on first six lines fails there.
Merge pull request #74 from rkitover/head-tail

Do not use deprecated calls for head/tail, fix man page detection