Closes #8: Added missing import.
Closes #7: Fixed bugs in handling whitespace and redirections.