Update core tests to fix edge case causing fail

The call to ls /dev was occasionally exiting before the check against @pid
occurred, leading to erroneous failures.
Update signal tests for readability
Improve readability for interaction tests
Refactor expectr#initialize

Moved output monitoring/processing code to its own private function.
Change STDIN and STDOUT to $stdin and $stdout