コマンドライン展開じゃないから
for filepath in ${files}*${a}*
のin句にテキストとして ${files}*${a}* の結果として "/tmp/test/*20140806*"が展開されているだけじゃないの?