What makes a "Special folder" - a bundle in the finder
The extension of the folder determines if the folder is a special folder. For example, apps have the extension .app, Kernel Extensions have the extensions .kext, etc.

Some folders, like the iPhoto Library, have extended attributes. They can be determined by running ls -@l in the parent directory of your folder. The attribute com.apple.FinderInfo stores the type of the folder. 

The easiest way to copy the attributes, in my personal opinion, is to use the ditto Terminal command to copy the files. It works just like cp, except that it also ensures that extended attributes are copied.