Implementd cwd option for better common js support and automatic creation of sub dirs for jsOutoutFile.