Update fileinfo.py

Simpler and better