I think it'd be way cleaner if you just returned the path and use `fs.realpathSync` where necessary.