Fixes for file paths and newline

Should improve compatibility for other operating systems.