Change max to np.max

This is a fix for https://github.com/astropy/photutils/issues/155.
There were several places in the code that should have been using `np.maximum` instead of `max` to do element-wise max on arrays.