Fix Windows bug

This fixes a windows bug with path names containing spaces. But this
introduces a security flaw, where arbitrary code execution is possible
thorugh shell injection.