The problem is not the compiler, but hidden in the function mex_compiling in the line 9. It looks like tis function expects the current directory to be a specific folder. So take a look into this function to find out, which folder this might be.
Using relative path names causes such bugs frequently. Prefer absolute path names.