DRY up the reference name generation and make corrections so extension is properly attached to file name
DRY up the reference name generation and make corrections so extension is properly attached to file name

Soullivaneuh/SonataMediaBundle,hug963/SonataMediaBundle,nicolasricci/SonataMediaBundle,vyshkant/SonataMediaBundle,hug963/SonataMediaBundle,Soullivaneuh/SonataMediaBundle,bgaleotti/SonataMediaBundle,vyshkant/SonataMediaBundle,OskarStark/SonataMediaBundle,peterkokot/SonataMediaBundle,kyaroslav/SonataMediaBundle,jerome-fix/SonataMediaBundle,hug963/SonataMediaBundle,bgaleotti/SonataMediaBundle,jerome-fix/SonataMediaBundle,Soullivaneuh/SonataMediaBundle,jerome-fix/SonataMediaBundle,OskarStark/SonataMediaBundle,Soullivaneuh/SonataMediaBundle,phansys/SonataMediaBundle,hug963/SonataMediaBundle,nicolasricci/SonataMediaBundle,kyaroslav/SonataMediaBundle,bgaleotti/SonataMediaBundle,jerome-fix/SonataMediaBundle,nicolasricci/SonataMediaBundle,rmzamora/SonataMediaBundle,phansys/SonataMediaBundle,rmzamora/SonataMediaBundle,sonata-project/SonataMediaBundle,vyshkant/SonataMediaBundle,nicolasricci/SonataMediaBundle,OskarStark/SonataMediaBundle,vyshkant/SonataMediaBundle,nicolasricci/SonataMediaBundle,peterkokot/SonataMediaBundle,vyshkant/SonataMediaBundle,peterkokot/SonataMediaBundle,rmzamora/SonataMediaBundle,bgaleotti/SonataMediaBundle,Soullivaneuh/SonataMediaBundle,OskarStark/SonataMediaBundle,hug963/SonataMediaBundle