Added a base directory function.
Merge pull request #11 from yosssi/base-directory

Added a base directory function.