Update OS-dependent filepath conversion

Tested in OS X Mountain Lion. Any Windows users
out there to complete the set?