Verify if RPM triggerindex is valid

Quick and dirty fix for issue https://github.com/jordansissel/fpm/issues/801

The code added for RPM triggers assumes that an RPM input would always have a trigger which is not the case.