PKGBUILD: Fix the regex

Previously the tests were only *sometimes* passing. Now they always
pass.
PKGBUILD: only call dict.keys() once
test: Add another test case for var expn