Removed spurious deletes and fixed permissions on version directory