Fix compilation and publishing scripts.
Remove files in pub dir.