Fix nil deref in spool command

Occurs when no module is currently `use`d

### Verification:

- [x] type `back` to get out of any module context
- [x] type `spool whatever`

#### before
see ```[-] Error while running command spool: undefined method `type' for nil:NilClass```

#### after
see expected successful output ```[*] Spooling to file whatever...```