Fixes a bug caused when parsing a theme config file without any attribute value pairs. Also refactors code to support an RSpec test to ensure it does not happen again