Moved dependency and update check to pem.rb