Fix := that should have been =.

This was causing a panic in error paths in syncFileUp() due to
countingReader being nil.
Merge pull request #38 from gusennan/extract_error_printing

Extract error printing and exit into functions
Merge branch 'master' into issue_3