Fixed #1, will throw an error if the target directory is not empty