The way it is now, it should be ok for `realpath` to be NULL, I like it more (even if not all places are accepting `realpath` = NULL now).