Added realpath() for resolution and join