This may be better using `realpath()` as it will work on different platforms and also checks the file exists.