Fixed bug that resulted in a ConcurrentModificationException when writing the playlist.