1) it's not possible to know the ID of the record before it is created. You would need to do the insert, the insert will store the ID in a session. then upload the file, using the session for the file name
2) Either the upload folder name is offer not offers, or something in your mod rewrite is renaming the folder.