Python script now creates and outputs correct hash/dict