Added realpath to dirname usages
Merge pull request #766 from bobvandevijver/dirname

Added realpath to dirname usages