Special character support in file paths

Thanks to @erikmuller for bringing it to our attention and for the initial fix.