Fix crash with file locking and dup'ed files

Ensure that we properly inherit the file locks when
duplicating files.

Signed-off-by: Jens Axboe <axboe@fb.com>
Prioritize lockfile= option

This needs to be run before adding files, or we'll potentially
make a mess of things.

Signed-off-by: Jens Axboe <axboe@fb.com>