LocalFileDetector in python should only attempt to upload a file, not directory. Fixes Issue 4608