fix #15 but use tempfile instead of run number
cosmetic changes (pylint)