allow passing config from external file

add support for passing configs from an external json file. add lib directory from current working directory on load path