make local_directory a global variable to allow saving of external video links, fixes #1350