build string from lines for dump_kb and check for failure on mvc detect

Clean up dump_kb method, was failing no matter the options passed.
Fail gracefully when no target is given on mvc detection method.