libraries.core: Convert the port number to a string

Previously, when checking the port number against the regex, we
assumed that the port would always be a string.  When an integer
was passed to the check_port function it would blow up and fail
the chef-client run.

This change will convert the value passed to a string and then
attempt to run the regex against the value.

The offending value was passed like:

```ruby
AFW.create_rule(node, 'Some rule', {
  'protocol' => 'tcp',
  'direction' => 'out',
  'user' => 'some_chump',
  'destination' => '127.0.0.1',
  'dport' => 8080
})
```