Use the path/filepath package instead of the path package. The path package assumes slash-separated paths, which doesn't work on Windows. But path/filepath manipulates filename paths in a way that's compatible across OSes.