realpath also resolves symlinks. without it, we have run into errors with some server configurations.