Fixed errors in tests

- use line.separator instead of '\n' for portability