I tried something like this a while back after I copied some files off a colleagues iPod, I thought maybe I could convert them but I couldn't do anything with the m4p those files because they are DRM'ed and encrypted, I think the encryption is tied to the iPod and iTunes that created the files. It seems the only way round it is to use the original iTunes to burn the tracks to CD then you can rip them (can you get virtual CD-RW to save time??)
I also got some m4a files which weren't DRM'ed and could convert these easily, using faad or mplayer to get wav files then use lame to convert them to mp3.
If anyone is interested, I was looking at writing some scripts but I found something on wikipedia using find to do mass conversion really easily, run the following commands from the folder contaning all the sub-folders and files you want to convert (if you have loads then you need lots of space to create lots of wav files)
find -name '*.m4a' -exec faad '{}' ';'
find -name '*.wav' -exec lame '{}' ';'
find -name '*.wav' -delete
worked for me
I then used gprename to rename any .wav.mp3 to .mp3
Hope this helps