Add a dirname function
Merge pull request #150 from raphink/dev/dirname_function

Add a dirname function