Fix for file name backward compatibility.

Prior to this change test DatabaseTester.TestScriptToDir was failing.
Removed unnecessary select *
Fix backward compatibility for procs.