Fix dump and restore not working on windows