added support for setting tmp dir for a resource