made minor changes in syntax
1. merged is_url and file_or_url_context in one import statement
2. changed syntax to check if path is a URL. now more compact