fileutils: port to Python 3

Blueprint: make-python3-compatible

Change-Id: Ie27686dba03e0a0706c0a5641ec48c18450123b1
Merge "fileutils: port to Python 3"