factorize code for ew_dyn_upload

use Filename module to check extension
make non ew_* module internal to the library

files with a prefix "ew_" are external modules (.cmi provided with the
library), other files are internal (.cmi non provided)