The program carries out the algorithm without crashing

The output prints characters that don't have corresponding
charecters. The program should print to a file instead of to the
screen.
Removed print statement
Merge pull request #2 from cameronbwhite/master

Made changes to algorithm