Fixes #574, this prevents the os path from being changed from under the diamond binary.