Remove appliance.db_session()

Fix appliance.rename()
Merge pull request #685 from jkrocil/utils-appliance-fix

Fix utils.appliance