AccessDeniedException when Exporting Playlists

It is possible to encounter an AccessDeniedException or more specifically a java.nio.file.AccessDeniedException when exporting playlists. This is typically caused by an anti-virus program blocking beaTunes, i.e. not allowing it to create the playlist file.

One program that has been reported to do this is Avast.