bugfix to create tmp dir