Fix bugs in movie2sql_temp and movie_temp.sh

Looks like it works ok so far.