Updated our realpath method to comply with the spec.