Adding ability to specify base directory.