fixes #811 : Handling asset creation without ext

Your code has the right effect but I find it unclear to deduce an extension of .txt when in reality there is no extension. Also in the other cases the dot is not included. Since the extension is really empty, please deduce an empty string in this case.