Creating modules directory only if needed