*metadata-handler*: added option not lock dir

on some cases when doing operations on a directory that has already been
externally locked, the lock by metadata-handler wouldn't work.
fixed a few install problems introduced by previous commits