Fixed bug in how bad pixels were handled in phot.phot.
Edited just so I couldcommit