Change format of engine configuration file

Store pid along with other details. Change some code to take care of the new
format, including the utils function that reads yaml.

Henceforth, try to keep yaml files in the project in the format:
name1:
    arg1:
    arg2:
name2:
    arg1:
    arg2:

Also wrote a function to write yaml in utils.py

Change-Id: I838ec927a439ac1aeea88ba0b1d71fc782777204