improved tests and rewrote expectation expressions to statements
cleanup tmp dir after tests