fs.chdir takes a block
use chmod with a block