Fix test to work under Windows.
The file being moved into must not have an open connection.
The assert must account for different line ending types.
Explicitly set path for all file references.