Check range of integer values in PPM text file

Add checks in PPM text file reading to make sure values are within the
specified range.
Fixes #141