Fixed problem with infinite recursion because of the figures and tables dir creation