Update chname to accept directories