indeed, the images directory can be removed for upgrades. Thanks for mentioning that.
instead of modifying your sources/join.php lets create a simple plugin to handle your php code.
Most likely your adding a single mysql query somewhere near the end of join.php. So make a plugin file join_insert_data.php and paste only your query in that.
here is a basic walkthrough:
1) Create a new folder /plugins/Myplugin/
2) Create a languages folder /plugins/Myplugin/languages
3) Create empty english.php file /plugins/Myplugin/languages/english.php
4) Create empty index.html in /plugins/Myplugin/
5) Create /plugins/Myplugin/join_insert_data.php with your custom php code.
the contents of join_insert_data.php will be executed just like an include where you see the hook location:
PHP:
eval (PluginManager::getPluginManager ()->pluginHooks ('join_insert_data'));
this is how plugins work, sprinkled through the php files are hook locations like the one above, whatever the value is (in this case join_insert_data) that is the name of the file we use for the plugin. This totally seperates your modified code from the core code allowing for easy, breezy upgrades
If you have any questions please ask