Prevent redundant realpath call