Refactored spec helper code, ensured that all tmp directories get removed.
Refactor nested if-statement; ensure that 'bare' is a boolean.