Fix possible corruption in plist parsing.

This fix is also related to getline buffers handling. Avoid
using them as permament strings.