Added test condition to readPgmLine that will have it continue until xWidth pixels are read