Also deal with trailing backslashes
Remove trailing \. so windows paths don't contain . directories aswell
Remove outdated test
Do not trim the path