Fix bug in install script

Change precmds and postcmds from dictionaries to lists. Dictionaries do
not preserve order, and do not allow duplicate keys. This could
potentially lead to bugs if there are commands that are dependent on
order or if there are duplicate commands.