Change to @olalonde suggestion for compatibility on both *nix and windows