add illegal destination directory check and test