If this is a directory, the type of the option should be `new_dirpath` instead of `new_filepath`.