Fixing #2 so that read returns associative array when the second parameter is true

Hey David here's a quick fix for #2