Deleting temp dir properly

Fix #815
remove unused temp dir variable