Make the test for the 'docker_opts' grain more robust.

Fixes #2982
Merge pull request #2986 from jbeda/docker-default-fix

Make the test for the 'docker_opts' grain more robust.