Added test_mode functionality.
Merge pull request #7 from octanner/test_mode

Added test_mode functionality.