fix tests in node 0.8.x:

- no `path.delimiter` yet
- strange exception trying to `process.env.hasOwnProperty`, so convert to `typeof` check