Fix issue with Windows paths

Fixes #1146