Fix for #15, as suggested in issue.
Was broken on windows before, now seems to work. Not sure if it's actually doing the work it's supposed to though.