Fix regex for retrieving flavor.

Previously a flavor like 'no_x11' would be truncated to 'no_x'.
https://projects.puppetlabs.com/issues/22004