python: improved filesystem api testing script