Added truncate

This is compliant with GNU ```truncate``` (mostly).