* Fix #523: added tests for fs.ftruncate() * fix #523: moved a function from truncate to ftruncate and made a few minor changes * Fixed indentation