use __dirname and path.resolve for paths; #6