WIP [DON'T MERGE] - Fix for file recording issues

Should fix the following issues;
 * https://github.com/timvideos/gst-switch/issues/69
 * https://github.com/timvideos/gst-switch/issues/50
 * https://github.com/timvideos/gst-switch/issues/49
 * https://github.com/timvideos/gst-switch/issues/48