Prevent MediaScanner infinite loop with invalid path