Writes the F90 module file to the specified directory.

def write_f90(self):
        """Writes the F90 module file to the specified directory.
        """
        from os import path
        self._check_dir()
        #Find the list of executables that we actually need to write wrappers for.
        self._find_executables()
        
        lines = []
        lines.append("!!<summary>Auto-generated Fortran module for interaction with ctypes\n"
                     "!!through python. Generated for module {}.</summary>".format(self.module.name))
        lines.append("MODULE {}_c".format(self.module.name))
        #Some of the variables and parameters will have special kinds that need to be imported.
        #Check each of the executables to find additional dependencies.
        lines.append("  use {}".format(self.module.name))
        lines.append("  use ISO_C_BINDING")
        for modname in self.needs:
            lines.append("  use {}".format(modname))        
        lines.append("  implicit none")
        lines.append("CONTAINS")
        #We want everything in these wrapper modules to be public, so we just exclude the 'private'.

        for execkey in self.uses:
            self._write_executable_f90(execkey, lines)

        lines.append("END MODULE {}_c".format(self.module.name))

        fullpath = path.join(self.f90path, "{}_c.f90".format(self.module.name))
        with open(fullpath, 'w') as f:
            f.write('\n'.join(lines))