Instead of fishing this out using `split`, could you use [`path.dirname`](http://nodejs.org/api/path.html#path_path_dirname_p) here?