Removing new line character from path