Fixing time estimation bugs, library path on Windows.
Fixing Matlab library path.