use filetools.mkdir instead of os.makedirs, adjust accordingly where really need, enhance unit tests