Added hacky fix for long path cleanup routine

@DeepDiver1975 @icewind1991