Fixed issues with removing files after copying them via SCP. This should resolve the issue with the directory being deleted