fix infinite recursion for validates_associated in pictures and add poltergeist gem