Add metadata.xml for all packages
Remove trailing whitespace and quote unquoted variables