Removed obsolete output directory.
Now it is generated by the computation.
Fixed warnings from -Wall compilation.
And solved a bug of if (i=4), since i=4 is an assignment and not an assertion!
Removed bash command errors.