Add inode information to filestat
Fix bug with truncating 0-length files
Refactorings