Remove use of getent

OSX doesn't have a `getent` command.

Since we're using bash, using `~` should be safe.