Fixed a directory write issue when injecting sandboxed apps