scripts: use items() instead of iteritems()

iteritems() was removed from Python 3. Use items() might slow it down
a little bit when running on Python 2, but give us the compatibility
of Python 3.

Signed-off-by: Zifei Tong <zifeitong@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>