Fixed incorrect file separator

Incorrect file separator was being used for a Windows environment. Swapped regex for split on path.sep - the platform specific file separator.