add custom base directory support

Signed-off-by: Ahmad Shah Hafizan Hamidin <ahmadshahhafizan@gmail.com>
Merge pull request #14 from ahmadshah/feature/base-directory

add custom base directory support