Adds record locking to work queue resource summary

If the file specified for the summary already exist, then the
individual summaries are appended to it. A queue has to request
the lock of the file, which makes possible for several queues to
share the same resource summary file.