Handle Windows-style paths.
remove trailing spaces