When a page inherits social_media_card from its parent, look for the image
in the parent directory before trying the current page path. This fixes
the incorrect path resolution when social_media_card is set on a parent
page.
The template now tries paths in this order:
1. Current page directory
2. Parent directory
3. Absolute path