Added fixes from previous tasks, added TemporaryFolder for tests