shared: fail reading a directory as a config file
shared: fail reading a directory as a config file

open() will happily open directories and other non-normal files.
Attempting to parse them as config files makes no sense, so check that
the opened file is indeed a regular file.

Signed-off-by: Pekka Paalanen <0f6ae7001e34c37b02fb2c1c2573ddf8f442136a@collabora.co.uk>
Reviewed-by: Jonny Lamb <3d1fb3642aaab2ff70e3392a5ab916bf99eed6a3@collabora.co.uk>
Reviewed-by: Nobuhiko Tanibata <92313f26b3566e64b50391ce0051fc0e1f775402@xddp.denso.co.jp>
Reviewed-by: Bryce Harrington <bdb14cfc1ab8d24e13de84adc40b41ae60c13bd1@osg.samsung.com>

udoprog/weston,Tarnyko/weston-xdg_surface_present,eyolfson/weston,kwm81/weston,jonnylamb/weston,Tarnyko/weston-xdg_surface_present,Fantu/compositor-spice,Fantu/compositor-spice,sir-murray/weston,giucam/weston,Gnurou/weston,sir-murray/weston,giucam/weston,kwm81/weston,Fantu/compositor-spice,mchalupa/weston,krezovic/weston,udoprog/weston,xorgy/weston,eyolfson/weston,jonnylamb/weston,xorgy/weston,krezovic/weston,Gnurou/weston,mchalupa/weston