Merge pull request #8 from lukekarrys/master

use __dirname and path.resolve for paths