Trim trailing slash from dumpdir and use os.MkdirAll to create new parent dirs as necessary.