Fix crash when locking local files on MacOSX

Added seek to beginning of file when opening a local file.  This is done automatically on Linux but not on MacOSX, leading to bug #120.  Closes #120.