missing slash in python code - this needs a rewrite to use python mkdir and os.path.join etc.