Make header coping work on Windows
Fix package removing logic

Things that does not look like a package need to be ignored.