use platform-specific path separators so build scripts work on Windows

This is the reviewed, commit-ready patch for [bug 858640](https://bugzilla.mozilla.org/show_bug.cgi?id=858640).