Fix file truncation on save.

dd issues one call to read() per block, so using a large blocksize with
a count of 1 means it only calls read() once. Bash's tcp redirection
doesn't always seem to return a full buffer in this case (often
stopping at 32KB), which results in files being truncated.

Avoid this by using head -c. head will use a sensible buffer size
automatically and continue to call read() until exactly the number of
bytes requested have been read. This fixes issue #5.
Merge pull request #7 from tornewuff/fix_truncation

Fix file truncation on save. Note, that rmate will probably not longer work with irix and solaris cause of unsupported "head -c". This will get fixed again later ...
updated doc-block
replaced "head -c" with dd again for compatibility reasons, use bs=1 and count=$value this time to hopefully prevent file truncation
Added new arguments to match official version.

From official repo:
(985e6f7) Add support for line, type, and name command line args.
Updated README to include new options
Merge pull request #10 from dhowden/extra-options

Added new arguments to match official version.
Close stdin/out/err before forking.

This ensures that if the parent shell exits, the tty can be closed (e.g.
when running in screen the window will close automatically instead of
waiting for all forked rmate processes to exit).
Merge pull request #12 from tornewuff/detach_better

Close stdin/out/err before forking.
Add support for different ways to get the hostname.
Added quotes to fix errors when editing a file path containing a whitespace character.
Merge pull request #14 from miceno/feature/hostname

Add support for different ways to get the hostname.
Merge pull request #15 from mrabbitt/feature/whitespace_in_path_fix

Added quotes to fix errors when editing a file path containing whitespace
use POSIX recommendation to check availability of 'hostname' command
removed use of tmp variable
tabs-to-spaces
removes ".sh" from name in README and changed formatting
comment
added support for '/etc/rmate.rc' and '~/.rmate.rc' config files
added support for "host=auto" to determine host from SSH_CONNECTION