Fixes for file paths and newline

Should improve compatibility for other operating systems.
Fixes for file path and newline