Avoid useless data copying when saving node output
Avoid using movefile

MATLAB's movefile seems to move files by copying their contents
instead of simply renaming the file. Thus we have replaced it by a
proper system call, which is generally much faster.