Details
Description
The lock file should either be created as /tmp/[domain]-civimail.lock (or something similar) or in the Drupal /files directory (for Drupal installs). I'm not sure where to put it for Joomla.
The current location fails on my Drupal installations.
1. I moved the directory to use the uploadDir where we store temp files (files/civicrm/upload)
2. however most of the times that directory has been created by apache and is probably permissioned
So, i also updated the code so you can pass a directory as an argument and that directory is used for the lock directory. Note that u'll need register_argc_argv turned on for this to work