Replaces fragile awk

This is a more robust implementation. Not only does it parse YAML as
data object, but it will return empty classes so the master doesn't blow
up in case of a problem. It will also log the error to syslog.

    $ time /etc/puppetlabs/puppet-dashboard/external_node classroom.puppetlabs.vm
    [...]
    real  0m0.069s
    user  0m0.010s
    sys 0m0.040s

    $ time /etc/puppetlabs/puppet-dashboard/external_node.rb classroom.puppetlabs.vm
    [...]
    real  0m0.430s
    user  0m0.122s
    sys 0m0.014s