util: Add a "writefile" unit test to the m5 utility.