Wrap mkdir /opt with directory check