Fixed tilda recognition for destination directory