Fixed dimension reading from header (partly)

Width is converted to an integer. Height seems to be an issue. PBM input
still incomplete.