Fixed a bug due to not importing the os module in the right place before trying to open a second script.