So look at this post here, you can see there is some general confusion about the best place to put files and the best way to reference them (especially with friendly url's on!).
Instead of continually replying to them in forums, I will begin to point them at this article.
1) Where should images and scripts be located? In a folder off of DesktopModules\MyCompany.MyModule\ ? Or would they be in a folder off of Portals\0\ ?
You should generally put images and scripts with your module. Only place them in the portals\0\ directory if they are shared by a number of different modules.
2) In the .ascx how do I form URLs to refer to the files? I've tried Images\blah.gif, DesktopModules\MyCompany.MyModule\Images.blah.gif, I've tried using ~ and not using ~, prefixing the url with \ and not prefixing it with \... nothing seems to work. BTW, I have friendly urls turned on.
For an image, you can do something like:-
<img src='<%= Me.ResolveUrl("Images\blah.gif") %>'>
Remember, if its being databound, it's the # character:-
<img src='<%# Me.ResolveUrl("Images\blah.gif") %>'>
The ResolveUrl method on the user control will resolve from the current controls (your user control's) path. Page.ResolveUrl will resolve from the base of your application.
3) I've tried doing <img src='<%= GetImageUrl(...) %>' ... >, but the "<%= ... %>" goes through to the client without being pre-processed by ASP.NET. Is this normal, or is something not working properly?
See Above.
4) How do I include .js scripts in my module? Can I just put a <link src="..." ...> at the top of the .ascx? How do I form the url so it finds the .js?
Use, <%= Me.ResolveUrl("Includes\Item.js") %>
5) In the .dnn file, if I specify <file><path>Some/Path/That/I/Need</path><name>blah.gif</name></file> will that full path be created properly if it doesn't exist? Or do I need to specify one folder at a time somhow (like Some, then Some/Path, then Some/Path/That, ...)?
Best method is to use the Resources.zip method. Basically you zip up all your resources, images, js, etc (maintaining the folder structure).
In your .dnn file, add the following:-
<resourcefile>Resources.zip</resourcefile>
6) If I need several files with the same name but different paths (such as Blue\Line.gif, Red\Line.gif, Green\Line.gif), how do I put them in the PA zip? Can I have paths in the zip? I've always put all the files in the PA zip without paths. How would I list them in the .dnn file so it knows which line.gif from the zip file goes with which <path>...</path><name>line.gif</name>?
See above, resources.zip is your friend :)
7) If my module needs a third-party dll for a control it uses, do I just include it in the PA zip file and in the .dnn (<file><name>ThirdParty.dll</name></file> with no <path>)? Will this cause any conflicts if some other module also includes that dll (maybe even a different version)?
Just include it, .dll's will automatically be moved to the bin directory. There may however be problems with other modules using a different version of the assembly as it may be replaced.
Hope this helps, post any other questions in comments, or the forums on this site.