Fix FileOutput component so it can be parallelized.

Previously only the last component created would really be able to write
to the file. Now, each component will open the file with an exclusive
lock for each message, append its line, and release the file.