added support for custom basepath for .bin folder