Merge pull request #28 from apache/feature/AMQNET-745

AMQNET-745 fixed NRE for single file assembly
diff --git a/src/nms-api/NMSConnectionFactory.cs b/src/nms-api/NMSConnectionFactory.cs
index b09ee4f..4c80e82 100644
--- a/src/nms-api/NMSConnectionFactory.cs
+++ b/src/nms-api/NMSConnectionFactory.cs
@@ -325,7 +325,11 @@
 				Assembly executingAssembly = Assembly.GetExecutingAssembly();
 				try
 				{
-					pathList.Add(Path.GetDirectoryName(executingAssembly.Location));
+					var path = Path.GetDirectoryName(executingAssembly.Location);

+                    if (!string.IsNullOrEmpty(path))

+                    {

+                        pathList.Add(path);

+                    }

 				}
 				catch(Exception ex)
 				{