I think it would look nicer to use Node's path.normalize function on both the expected and actual paths: http://nodejs.org/api/path.html#path_path_normalize_p