Use timeout when invoking rpm

The process can block indefinitely when there's a specific case of rpm
database corruption, so adding a timeout. Five seconds ought to be
enough for anybody.