fixes path regex to work on all platforms