Fixes issue #501 and improves an error message

I was getting an error from my supervisor config due to having %(process_num)s
in the command field of a program. This is supposed to work, but apparently some
refactoring broke it accidentally. The reason is that we call saneget outside
the for-loop that sets the process_num value, and so the expansion fails.

This also improves the "Format string contains names which cannot be expanded"
error message, so that it displays a list of expansions variables that are
available.
Fixes /'dict_keys' object has no attribute 'sort'/ on Python 3.2
Merge branch 'Issue501_2'
Fixes issue #501 and improves an error message

I was getting an error from my supervisor config due to having %(process_num)s
in the command field of a program. This is supposed to work, but apparently some
refactoring broke it accidentally. The reason is that we call saneget outside
the for-loop that sets the process_num value, and so the expansion fails.

This also improves the "Format string contains names which cannot be expanded"
error message, so that it displays a list of expansions variables that are
available.
Add test for process_num expansion in command
Fix test name
Merge github.com:Supervisor/supervisor
Merge branch 'master' into issue452