Fixes unit test EOL differences between different OS

using require('os').EOL instead of '\n' in unit test