Update ecmd.c

Bugfix:
a) one closing bracket missing in each of these ECMD_FINAL lines
b) prototype for sprintf_P is declared in stdio.h, but this is not included
thx eku ;)