using substr() function to test for last three characters of string to identify whether uploaded file is csv or not