remove ensure_trailing_slash() as os.path.join() and os.makedirs() both take care of trailing path separators