Initial (bad) version of sudo_authenticate
Refactored tests adding setup_io and teardown_io