This patch fixes the 'test' mode of the 'network' state module.

Before this patch, rh_ip.py returned newlines in some cases and no newlines in other cases, making the 'network' state think there were always differences that needed to be applied. This patch makes rh_ip.py never return newlines. This patch also fixes the formatting of the diff output.