Fix reference repositories on Windows.

Windows git did not look-up the alternative object directory if the
alternates file ended with \n, this patch simply changes println to
print for that file. That fixed all my issues with alternates.
Require exact match of alternates content

The content of the alternates file (used for reference repositories)
is required to have a precise format on Windows (forward slash
separator and no trailing end of line character).  This test asserts
the alternates file contents are exactly as required, without any
trimming of leading or trailing whitespace.
Merge pull request #80 from tru/fix_alternates_windows

Fix reference repositories on Windows.