Change iteritems() to items() in getInputList. Add test. Fixes #40.