codeeval.com penultimate word commit. added test cases for later optimization.