Fix ClassCastException when specifying the number of versions to rollback

If given, parse the 'versions' command line argument as an integer before handing it off to core/rollback-last, which expects an integer.