Pass directory mode info to targets
More context in #357. Request via  @div72

> The problematic part is even if the path of the script is known, transpiler should be able to tell if it's working on a directory and if the any files on the directory has a main function to properly assign a module name.