suggestions to fix numeric postfixing

Made some changes to the way you were de-duping the filename - please accept this pull to your pull mozilla-b2g#10790