Added realpath to dirname usages
Merge pull request #768 from bobvandevijver/dirname-v1.0

Added realpath to dirname usages