Fix writing "link subset" rules
Writing a "link subset" rule missed a space, which resulted in something like link subset/foo -> /bar,
Also add a test rule to tests/cleanprof.* to ensure this doesn't break again.
I propose this patch for 2.9..master (at least the aa.py fix - if the tests/cleanprof.* changes don't apply, I'll only backport the aa.py fix)