Well - the file location for the code is under Form Options --> Programming (also from the Developer tab on the Ribbon --> Language). I believe in InfoPath Options you can also change the default location for code files.
When publishing, however, you don't have to have access to these files - you'll notice on the dialog there are two buttons. One says Browse - so you can find the project and re-build the code DLL. The other says Ignore - this will allow you to publish the form using the current code DLL that is in the template.