Added support for caching a trajectory from MPI without a prepare and execute file
Added synchronization for the caching code