patch for issue#2 - path checking now OS and platform (node/browser) agnostic