added tmp directory to gitignore; refactored specs to use let and also use local variables where appropriate