File Serialization problem

 * Fixed serialization with flags
 * Fixed several command stdout messages
 * Fixed empty facts exception

 Closes-bug: #1307577
 Closes-bug: #1307516

Change-Id: Iecbd12959c4f8e707249c6a58df0cc5e432fd1df
Merge "File Serialization problem"