Added python 3 support and fixed small bug with picture appending

Hi! Thanks for great work! It saved my time!

I've added python 3 support and fix bug with picture appending: picname variable contains full path to picture, but in some cases we use it as name of file (not path). For example, we had
shutil.copyfile(picname, join(media_dir, picname))
media_dir can contain something like 'PROJECT_DIR/media/'
picname can contain something like 'PROJECT_DIR/some_another_dir/1.jpg'
os.path.join(media_dir, picname) will return 'PROJECT_DIR/some_another_dir/1.jpg', but it's not what we need!