Generate configdrive file from string instead of file

Change-Id: I4b0a2574dd8330e6118eb38cd9104a5e5fadeab5