Adding feature to truncate files.

       * Uses os.ftruncate to truncate files
       * Can be used with both random file names
         and regular file names.

Signed-off-by: Vijaykumar Koppad <vijaykumar.koppad@gmail.com>