javascript file size and extension validator