Bug Fix removing directories

fixed bug when removing directories from rails console.