[staging_parse] Raise error if given invalid source

A string like 'foo:bar' is a valid URI but contains no path.
URI.parse('foo:bar') returns nil, and calling File.extname(nil) raises
"can't convert nil into String".

This commit ensures that the given URI has a valid path and fails early
if the input is malformed.
Merge pull request #11 from adrienthebo/staging_parse-fail_early_on_malformed_uri

[staging_parse] Raise error if given invalid source