Small test improvements and regular expression handling

Because whitespace is hard, there were a number of tests in the AppExtensionTests that were never run, as they were defined inside of the setUp method. This fixes that.