With the removed trailing slash, the file path gets messed up.

Used the os.path.join() function to fix this issue.