diff --git a/bin/install.js b/bin/install.js
index <HASH>..<HASH> 100644
--- a/bin/install.js
+++ b/bin/install.js
@@ -18,7 +18,7 @@ var javaHome=process.env['JAVA_HOME'];
 var os = require('os');
 var path = require('path');
 var fs = require('fs');
-var isWin=/win/.test(os.platform());
+var isWin=/^win/i.test(os.platform());
 var binaryDir = path.resolve(
    process.env[isWin ? 'USERPROFILE':'HOME'],
    '.webdriver-sync'
diff --git a/src/facade.js b/src/facade.js
index <HASH>..<HASH> 100644
--- a/src/facade.js
+++ b/src/facade.js
@@ -16,9 +16,8 @@
 var path = require("path");
 var java = require("java");
 var os   = require('os');
-var isWin=/win/.test(os.platform());
 var binaryDir = path.resolve(
-   process.env[isWin ? 'USERPROFILE':'HOME'],
+   process.env.USERPROFILE || process.env.HOME,
    '.webdriver-sync'
 );
 var seleniumJarPath=path.resolve(
closes #<I>: Windows isn't being detected properly. Mac is mistaken for windows. bug.