The first thing you have to do is enable freestyle and create a new render layer(I called it lines). Next, you can delete the line set for the default RenderLayer and add one for the lines layer.
You can then enable transparency and(on the lines RenderLayer) disable use Environment, AO, Surfaces, and Hair.
If you render now it will render two RenderLayers, one with your scene and one with only the lines. You can switch between them at the bottom of the UV/Image Editor(after it renders). Then, if you then switch to the node editor and enter the compositor and check Use Nodes
, you can duplicate the Render Layers
node and set the duplicated one to the lines RenderLayer. You can then connect both of their outputs to two file output nodes and select the output destination(Remember to give them names). It will then output the lines and rendered image separately.