Extracts a top-level class or object from current file and places it in a separate file in the same package and directory.